package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.CodeNameResult;
import com.koocloud.electroplatemanage.pojo.Operate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program:
 * @description:
 * @author: wjx
 * @create: 2020/11/18 17:36
 */
@Mapper
public interface OperateMapper {
    //通过pk查询一条记录 delete_flag = "1"
    Operate selectByPk(String pkOperate);
    //通过pk查询一条记录  delete_flag = "0"
    Operate selectByCode(String typeworkCode);
    //查询所有记录
    List<Operate> selectAllData(Operate operate);
    //根据状态进行模糊查询 启用为1 禁用为0
    List<Operate> selectByDeleteFlag(Operate operate);
    //插入一条记录
    int insert(Operate operate);
    //批量插入记录
    int batchInsert(List<Operate> listOperate);
    //逻辑删除一条记录
    int delete(@Param("operateId")String operateId, @Param("deleteFlag") String deleteFlag);

    int rDelete(int operateId);
    //通过pks批量逻辑删除记录
    int batchDeleteByPks(List listPks);
    //修改一条记录
    int update(Operate operate);
    //修改一条记录 delete_flag
    int updateFlag(Operate operate);
    //获取
    List<CodeNameResult> selectTypeWork(String idOrName);

    //通过镀槽名称查询一条记录
    Operate selectByName(String name);
    //获取工种总数
    int selectAmount();
    //根据镀槽编号查询一条数据
    Operate selectByTankNo(String operateNo);
}